<div>
	<div style='width: 930px;' data-dojo-type='ism.widgets.Dialog' data-dojo-attach-point='dialog'
		data-dojo-props='title: "${dialogTitle}", 
			autofocus: false,
            onEnter: function() {
				if(!dijit.byId("${dialogId}_saveButton").get("disabled")) {
					dojo.publish("${dialogId}_saveButton", ""); 
				} 
			},  
			closeButtonLabel: "${nls.messaging.dialog.cancelButton}",
			instruction: "${dialogInstruction}",
			buttons: [ new dijit.form.Button({ 
				label: "${nls.messaging.dialog.saveButton}",
				id: "${dialogId}_saveButton",
				onClick: function() { dojo.publish("${dialogId}_saveButton", ""); }
			}) ]'>

		<form id="${dialogId}_form" method="post" data-dojo-type="dijit.form.Form">

			<div style='float: left; width: 505px; display: inline-block;' id='${dialogId}_leftGroup'>
				<!-- left section -->

				<div style='padding: 1px 1px 5px 1px; display: block;'>
					<div data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_Name'
						data-dojo-props='fieldWidth: "300px",
						label: "${nameLabel}:",
						required: true,
						labelAlignment: "horizontal",
						tooltipContent: "${nameTooltip}",
						labelWidth: "160"'></div>
						</div>

				<div style='padding: 1px 1px 5px 1px; display: block;'>
					<select id="${dialogId}_RuleType" data-dojo-type='ism.widgets.Select'
						data-dojo-attach-point='field_RuleType'
						data-dojo-attach-event='onChange:changeRuleType'
						data-dojo-props='
					label: "${typeLabel}:",
					alignWithRequired: true, 
					tooltipContent: "",
					invalidMessage: "${ruleTypeMessage}",
					labelAlignment: "horizontal", 
					labelWidth: "160",
					fieldWidth: "300px"'>
						<option value="1" selected="true">${nls.messaging.destinationMapping.ruleTypes.type1}</option>
						<option value="2">${nls.messaging.destinationMapping.ruleTypes.type2}</option>
						<option value="3">${nls.messaging.destinationMapping.ruleTypes.type3}</option>
						<option value="4">${nls.messaging.destinationMapping.ruleTypes.type4}</option>
						<option value="5">${nls.messaging.destinationMapping.ruleTypes.type5}</option>
						<option value="6">${nls.messaging.destinationMapping.ruleTypes.type6}</option>
						<option value="7">${nls.messaging.destinationMapping.ruleTypes.type7}</option>
						<option value="8">${nls.messaging.destinationMapping.ruleTypes.type8}</option>
						<option value="9">${nls.messaging.destinationMapping.ruleTypes.type9}</option>
						<option value="10">${nls.messaging.destinationMapping.ruleTypes.type10}</option>
						<option value="11">${nls.messaging.destinationMapping.ruleTypes.type11}</option>
						<option value="12">${nls.messaging.destinationMapping.ruleTypes.type12}</option>
						<option value="13">${nls.messaging.destinationMapping.ruleTypes.type13}</option>
						<option value="14">${nls.messaging.destinationMapping.ruleTypes.type14}</option>
					</select>
				</div>

				<div style='padding: 1px 1px 5px 1px; display: block;'>
					<div data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_Source'
						data-dojo-props='fieldWidth: "300px", 
				label: "${sourceLabel}:",
				required: true,
				labelAlignment: "horizontal",
				tooltipContent: "${sourceTooltip}",
				labelWidth: "160"'></div>
				</div>

				<div style='padding: 1px 1px 5px 1px; display: block;'>
					<div data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_Destination'
						data-dojo-props='fieldWidth: "300px", 
				label: "${destinationLabel}:",
				required: true,
				labelAlignment: "horizontal",
				tooltipContent: "${destinationTooltip}",
				labelWidth: "160"'></div>
				</div>

				<div data-dojo-type='ism.widgets.TextBox'
					data-dojo-attach-point='field_MaxMessages'
					data-dojo-props='fieldWidth: "150px", 
				label: "${maxMessagesLabel}:",
				required: true,
				value: "5000",
				labelAlignment: "horizontal",
				tooltipContent: "${maxMessagesTooltip}",
				invalidMessage: "${maxMessagesInvalid}",
				labelWidth: "160"'></div>
						
				<div style='padding: 1px 1px 5px 1px; display: block;'>
					<select id="${dialogId}_RetainedMessages" data-dojo-type='ism.widgets.Select'
						data-dojo-attach-point='field_RetainedMessages'
						data-dojo-attach-event='onChange:changeRetainedMessages'
						data-dojo-props='
						label: "${retainedMessagesLabel}:",
						alignWithRequired: true, 
						tooltipContent: "${retainedMessagesTooltip}",
						labelAlignment: "horizontal", 
						labelWidth: "160",
						fieldWidth: "150px"'>
						<option value="None" selected="true">${nls.messaging.destinationMapping.dialog.retainedMessages.none}</option>
						<option value="All">${nls.messaging.destinationMapping.dialog.retainedMessages.all}</option>
					</select>
				</div>

				<div style='padding: 1px 1px 5px 1px; margin: 1px; display: block;'>
					<div class='idxLabel' id='${dialogId}_dm_label_Enabled' style='width: 160px; display: inline-block'>
					   <span class='alignWithRequired'></span>
					   ${nls.messaging.destinationMapping.grid.enabled}:</div>
					<div id="${dialogId}_enabledCheckBox" data-dojo-type='idx.form.CheckBox' data-dojo-attach-point='field_Enabled' 
						aria-labelledby='${dialogId}_dm_label_Enabled' data-dojo-attach-event='onChange:changeEnabled'
						data-dojo-props='fieldWidth: "300px", checked: true'></div>
				</div>

			</div>

			<div style='float: left; display: inline-block; width: 355px; height: 200px;' id='${dialogId}_rightGroup'>
				<!-- right section -->
				<div style='padding: 1px 1px 5px 1px; margin: 1px; display: block;'>
					<div style='padding: 5px 0px 10px 12px;'
						data-dojo-type='ism.controller.content.QMConnectionGrid'
						data-dojo-attach-point='field_QueueManagerConnection'
						data-dojo-props='
						idPrefix: "qmc_${dialogId}_"'></div>
				</div>

			</div>

			<br clear="all" />
		</form>
	</div>
</div>

